<?php
/*--------------------------
	file:	base.class
	intro:	核心基类
--------------------------*/
class Base{
	function _print($arr){
		echo "<pre>";
		print_r($arr);
		echo "</pre>";
	}
	function _sprint($arr){
		$str = "<pre>";
		$str.= print_r($arr, true);
		$str.= "</pre>";
		return $str;
	}
	function _debuginfo($str){
		$s = "<div id='debuginfo' style='width:400px; height:400px; position:absolute; margin:-200px 0 0 -200px; top:40%; left:50%; font-size:12px; background:#ccc; border:solid 5px #bbb; z-index:10000;'><div style='text-aling:left; font-size:14px; height:30px; background:#bbb; color:blue; line-height:30px;'>Debug platform 1.0</div>";
		$s.= "<div style='height:350px; color:#333; background:#f3f3f3; text-align:left;overflow:auto;'><div style='margin:10px;'>$str</div></div>";
		$s.= "<div style='height:20px;color:#666;text-align:center; line-height:20px;'>Runtime 1.33342ms</div></div>";
		$s.= "<script>document.body.onclick=function(){debuginfo.style.display='none';};</script>";
		return $s;
	}
	function _debugshow($str){
		echo $this->_debuginfo($str);
	}
}

?>